package test6.pages;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;

public class LoginPage {
	private static WebElement element=null;
	
	public static WebElement login_UserName(WebDriver driver){  //获取用户名输入框
		element = driver.findElement(By.xpath("/html/body/form/table/tbody/tr[4]/td[2]/input"));
		return element;
	}
	
	public static WebElement login_Password(WebDriver driver){  //获取密码输入框
		element = driver.findElement(By.xpath("/html/body/form/table/tbody/tr[6]/td[2]/input"));
		return element;
	}
	
	public static WebElement login_submit(WebDriver driver) {//获取登录按钮
		element =driver.findElement(By.xpath("/html/body/form/table/tbody/tr[8]/td[2]/input"));
		return element;
	}
	
	public static WebElement register_11(WebDriver driver) {//跳转到注册页面
		element =driver.findElement(By.xpath("(.//*[normalize-space(text()) and normalize-space(.)='Web Tours'])[2]/following::b[1]"));
		return element;
	}
	
	
	public static WebElement register_UserName(WebDriver driver) {//获取注册用户名
		element =driver.findElement(By.name("username"));
		return element;
	}
	
	public static WebElement register_Password(WebDriver driver) {//获取注册密码
		element =driver.findElement(By.name("password"));
		return element;
	}
	
	public static WebElement register_passwordConfirm(WebDriver driver) {//获取注册密码确认
		element =driver.findElement(By.name("passwordConfirm"));
		return element;
	}
	
	public static WebElement register_firstName(WebDriver driver) {//获取注册姓
		element =driver.findElement(By.name("firstName"));
		return element;
	}
	
	public static WebElement register_lastName(WebDriver driver) {//获取注册名
		element =driver.findElement(By.name("lastName"));
		return element;
	}
	
	public static WebElement register_address1(WebDriver driver) {//获取注册地址
		element =driver.findElement(By.name("address1"));
		return element;
	}
	
	public static WebElement register_address2(WebDriver driver) {//获取注册城市
		element =driver.findElement(By.name("address2"));
		return element;
	}
	
	public static WebElement register_register(WebDriver driver) {//获取注册确认
		element =driver.findElement(By.name("register"));
		return element;
	}

}
